Using two outputs

devasri:
wouldn't analogWrite be too slow to operate at .25 us? or 40 kHz

Maximum PWM frequency being 4 MHz (albeit at just 2-bit resolution) doing a 40 kHz PWM should be no problem. More tricks here.