The home side made the perfect start, taking the lead after just 90 seconds.
Billy Jones' throw-in from the left was flicked on and Morecambe skipper Nick Fenton's clearing header only went as far as midfielder Carter, who chested the ball down and beat Barry Roche with a sweet half-volley from 25 yards.
The Robins controlled much of the first half, although Morecambe threatened during a brief spell around the mid-point as Richard Brodie had a shot cleared off the line by Steve Elliott before Kevin Ellison's header brought another goal-line clearance from Sido Jombati.
Ellison was sent off just before the hour for an alleged headbutt on Elliott, and the visitors were always up against it from that point.
They were eventually caught on the break in stoppage-time when Kaid Mohamed found Carter and he drove home to seal the points and move the Robins into the play-off places.