There are three phases of a charging system. The charging system frequently will create AC current and diodes within the alternator will act as a rectifier and convert the AC current to DC where it can be stored in a battery.
Here is a diagram
If one or more of the diodes fails in the alternator you begin to see the pulse of the charging in your lights. It's especially apparent when two legs of the three legged system are down.
This is what the waveform looks like
The top wave is AC the lower wave is DC.
If you you take wave 2 and 3 out and only have the signal from number 1 then you can begin to see why you have the pulsing affect.
The reason it does it when you get on the gas is that your rpm's increase and the transmission and the engine engage, when you get off the gas most automatic transmission cars drop their rpm's and disengage from the transmission. Hence the pulsing while on the gas. Hope this helps, good luck.