Doncaster made a terrific start, scoring two goals in the first four minutes, but the Merseysiders clawed their way back to 2-2 before half-time, despite having striker Eugene Dadi sent off in the 33rd minute for striking John Doolan.
Doncaster always looked the more likely winners and never really looked in danger after regaining the advantage in the 52nd minute.
Tranmere gambled in the closing stages by sending on Theodore Whitmore but Doncaster soon afterwards put the issue beyond doubt with their fourth goal.
Michael McIndoe headed home the Doncaster opener in the second minute from a deep cross by Dave Mulligan and two minutes later Gregg Blundell produced an excellent left-foot finish from 12 yards when set up by Ricky Ravenhill.
Tranmere pulled a goal back in the 11th minute through Dadi. His first shot hit the post but he got a second touch although the ball appeared to cross the line off defender Nick Fenton.
Tranmere drew level in the 44th minute. Paul Brown created the chance with a deep cross from the left and Paul Hall was able to head home at the far post.
However, Doncaster regained the advantage in the 52nd minute through Ravenhill who produced an excellent finish from a cross by James Coppinger.
Tranmere rallied but couldn't find a way through a Doncaster defence well-marshalled by skipper Steve Foster.
Neil Roberts made it 4-2 for Doncaster with seven minutes left when he netted with an excellent right-foot shot from close range after being set up by Coppinger.
But two minutes later it needed a fine save by visiting keeper Iain Turner to keep out a free-kick by Ryan Taylor.
The win kept alive Doncaster's hopes of clinching a play-off place.