I think a realistic combat distance for a starship would be between 100 and 400km for phasers, and 1000 to 5000km for photon torpedoes (assuming the torpedoes move pretty damn fast and can cover that distance in five to ten seconds).
200,000 km is actually less than 1 light-second. If phasers and and photorps are superluminal (as seems to be the case in TOS) then maybe it's not such an absurd distance after all?
Photon torpedoes aren't anywhere CLOSE to superluminal when fired under impulse power. Meanwhile, the fact that they can sustain the ship's FTL velocity at warp has been handwaved away by the tech manuals.
As for phasers, the time delay isn't as much a factor as you might think. You can only hit what you can see, and your accuracy depends on how far
you can see; in the case of a phaser weapon, its accuracy is limited by the optical system that's used to direct the beam onto a target, the system's maximum resolution and the amount of mechanical control you have over both. Assuming the ship's sensors and optics are good enough to image starships at that distance -- and they almost certainly are -- the PHASERS may not be that precise, and the mechanical systems that steer them may not have enough fine control to track a moving target at that distance.
It's also a bit odd to mention the unrealism of Trek combat without acknowledging the fact that neither phasers or photon torpedoes ever seem to MISS their targets except under very special circumstances. It seems like something that should be more common at ANY range, no matter how those weapons work.