After a scrappy first-half, Luton created a host of chances in the second period, twice hitting the woodwork and seeing other efforts superbly saved by visiting goalkeeper Andy Warrington.
Nicholls gave Luton the lead on 60 minutes curling home a free-kick from 20 yards.
Substitute Peter Holmes and Ahmet Brkovic both went close before Rovers hit Luton on the break in the 82nd minute when Ricky Ravenhill crossed for Roberts to slide past Marlon Beresford.
Curtis Davies struck the crossbar a minute later and Holmes powered a shot against the post with five minutes remaining.
In the end, Luton were thankful for Sol Davis' last ditch challenge on Rovers substitute Guy Ipoua as Doncaster threatened to steal all three points at the death.
Town started brightly and Rowan Vine played a one-two with Steve Howard before firing at Andy Warrington in the second minute and Paul Underwood headed just wide from 10 yards following Kevin Foley's right-wing cross three minutes later.
But Rovers frustrated Hatters and created half chances themselves when skipper Nick Fenton saw his header from Jermaine McSporran's 22nd minute corner deflected into Beresford's arms and Gregg Blundell lobbed over 10 minutes later after a run down the left.
Hatters, though, should have taken the lead at the end of a scrappy first-half when Howard headed back Brkovic's cross and Vine nudged on for Stephen O'Leary to stab wide from six yards.
Underwood almost caught visiting goalkeeper Warrington by surprise in the 52nd minute when he fired a free-kick from wide on the right straight at goal, but the stopper tipped the ball over.
But home captain Nicholls went one better on the hour when he sent his curling 20-yard free-kick in to Warrington's top right hand corner to give Luton the lead.
Substitute Holmes almost made it 2-0 in the 72nd minute, but his 20-yard volley was palmed away by Warrington and Brkovic also saw a spectacular overhead effort pushed aside four minutes later.
However, Luton were shocked when Doncaster equalised on the break as Ravenhill found space on the left and squared for Roberts to hold off his marker and slide home.
A frantic finale saw Davies hit the bar and Holmes strike the post as Doncaster hung on to frustrate the Town.