You could use almost any constant current driver, such as the LM317 circuit or the Rckstr circuit to set the maximum diode current. Then, just connect a shunt transistor such as an npn or an nfet to steer some of the diode current to ground in order to control the current/light output. You could...