Using only transformer to supply 12V AC
It is completely fine to use the 12 V transformer directly.  Your device wants 12 VAC, and it puts out 12 VAC.  As long as it can source the current that the device needs, it should be fine.

Depending on what kind of power supply, if any, is in the lamp, it might need 17 VDC, 12 VDC, or won't work on DC at all.

If it's just a incandescent bulb, then it lights up as a function of the RMS voltage.  In that case, if would run fine from DC and would need 12 V.

If the lamp is made from LEDs, then it most likely has a power supply in it.  There is a chance that the power supply full wave rectifies the AC to make DC internally, then regulates that further.  This is the case where DC would work, but should be the peak of the AC voltage.  Since the peaks of a sine are sqrt(2) times its RMS, the DC to use would be 17 V.

High power lamps that have a more fancy power supply that includes power factor regulation might work on a range of DC voltages, or might not work at all, depending on the details of the power supply.  However, it is unlikely that this is done in a low power lamp.  If the lamp were high enough power to require power factor regulation, then it wouldn't likely run from 12 V.

Since you've already tried 12 VDC and it seems to work, you either have a dumb incandescent bulb, or a flexible enough switching power supply with a wide enough input voltage range to be able to tolerate 12 V in.