Mohamed powered home a superb right-wing cross from substitute Ellis Harrison to give the hosts a win they did not deserve.
Despite naming an attacking line-up, Clarke saw his team struggle to create any clear chances against well-organised visitors.
Neither goalkeeper had a worthwhile save to make until the dramatic finale, which eased Rovers' relegation fears.
The best efforts of a disjointed first half, littered by injuries, came from the visitors. Andrew Fleming grazed a post with a 20-yard shot in the 26th minute.
Morecambe lost centre-back Chris McCready to injury in the 20th minute, but had the better of the half, with Jamie Devitt also shooting just wide during seven minutes of stoppage time.
Rovers failed to create a worthwhile chance in the opening 45 minutes but can breathe a little easier after three welcome points.