How can pilots fly VFR over-the-top in overcast conditions?
Perhaps the most important rule for a VFR pilot is "see and avoid" -- be able to see any immediate dangers (other aircraft, buildings, ground) and avoid them. When flying above the clouds, you can certainly see other aircraft and avoid them (as long as you're maintaining required cloud clearances), and the same for buildings. You cannot see the ground but on the presumption that your altitude is well above the ground and not significantly changing, this is not a factor.

As long as you're able to see the horizon, you're unlikely to become disoriented to the point of not actually knowing that the aircraft is or isn't flying straight and level. (Contrast that with flying in the clouds, where it's easy to become spatially disoriented and not be aware that you're starting to dive.) Limitations are basic: it's the PIC's responsibility to follow the regulations.

As to heading in the right direction and navigation in general, VFR flight does not mean one cannot rely on radio aids to navigation. VOR and GPS certainly make navigation very possible while on top, but to get to your question of "can it be done safely?" -- I suppose this comes down to a question of how reliable are your electronics and where are the weak spots; is the pilot under flight following or otherwise in contact with ATC, etc. If one were on top and were to lose the electrical system, there's certainly an emergency to be declared. If already in contact with ATC, it's an emergency that can likely be managed with the utmost of safety.