Shola came off the bench to open the scoring with a deflected 84th-minute shot, with Sammy making sure of the Magpies' progress in the fourth minute of stoppage time.
It was a first win of the season for manager Alan Pardew, whose much-changed side looked unconvincing in setting up a home tie with Leeds.
Elsewhere, Kenwyne Jones-inspired Stoke saw off Sky Bet League One side Walsall at the Britannia Stadium.
The Trinidad and Tobago striker put the hosts ahead, but Ashley Hemmings levelled in the 57th minute.
There was to be no shock, though, with Jones netting a further two to secure his hat-trick and a 3-1 win.
Aston Villa went some way to laying to rest the ghosts of last season's semi-final exit to Bradford by easing past Rotherham 3-0.
An Elliott Ward own goal and Cristian Battocchio chip saw Watford past Bournemouth 2-0 at Vicarage Road.
Two matches went to extra-time, with the home sides eventually triumphing in both ties.
Everton looked like they could suffer an embarrassing exit to Stevenage when Luke Freeman put the visitors ahead in the 36th minute.
On-loan Barcelona prospect Gerard Deulofeu managed to level on the stroke of half-time, but the Toffees were unable to stop the match going to extra-time.
It was not until Marouane Fellaini's goal five minutes from time that eventually saw Everton through 2-1 - Roberto Martinez's first win at the Goodison Park helm.
Nottingham Forest are also through 2-1 victors after extra-time against Millwall at the City Ground.
Liam Feeney levelled Matt Derbyshire's goal late in normal time, only for Jamaal Lascelles to head home the decider.