3 to 4 millisecond is very short for the timer when you bear in mind that it has to issue the event to the system which may already have other events queued, when this finally gets actioned you then intend to switch hardware and set the next event. It soon gets bottlenecked. The only way I can think that it might work would be to run on its own thread, you could then set a loop running and control the light within this loop. You might be able to use the system clock to accurately set the frequency, however I suspect that it might only work using a variable to count iterations of the loop which will vary from device to device.
There's a lot of "might's" in my suggestion as I've never tried this and don't know for sure if it's possible to trigger hardware from another thread. Maybe someone else can confirm if it's worth a try?