Make your Pac-man a bullet.
If Pacman is moving to left, pressing right should turn it instantly, pressing up and down should make it turn at the next intersection or corner.
If Pacman is moving to the right, pressing left should turn it instantly, pressing up and down should make it turn at the next intersection or corner.
If Pacman is moving up, pressing down should turn it instantly, pressing left and right should make it turn at the next intersection or corner.
If Pacman is moving down, pressing up should turn it instantly, pressing left and right should make it turn at the next intersection or corner.
If no keys are pressed when Pacman hits an obstacle (corner, wall), then it would just idle and wait for the input.
Simple, really. All you need is to make Pacman remember the keystroke until it reaches a turning point, then it makes a turn and forgets the stroke.
For ghosts, implement a basic bullet AI that decides where to turn on each intersection/corner based on distance from Pacman. You just change the angle, but keep the speed constant. Make sure they can turn in an instant.
As for corners and intersections, think you'd need to make some sort of detectors. In intersections there is no collision unless you make a detector there. So whenever Pacman or ghosts overlap the detector, the turning event would be initiate.