Why not? just measure the voltage (dc) and calculate the resistor needed
for a particular LED..
if its ac voltage, you would need a diode also and calculate total resistance needed.. diode and resistor ..
If i remember 12 volt supply needs around a 1200 ohm resistor.
use a 5 k pot and connect up. turn pot down to proper brightness,
measure the pot..put in fixed resister to match..