Defoe goal gives England warm-up win
Slovenia, who replied with a header by substitute Zlatan Ljubijankic five minutes from time, face Poland in an important qualifier on Wednesday.
The visitors played some neat attractive football especially in the opening 30 minutes, but never looked like winning the first meeting between the two countries.
England took the lead when Swedish referee Jonas Eriksson appeared to totally misjudge a mild clash between Bostjan Cesar and Rooney after 31 minutes.
If anything, Rooney fouled Cesar, who lent across the striker with his arm out-stretched but made no contact. Rooney tripped over him and fell and did not appeal for the penalty.
To compound what appeared to be an error, Cesar was booked and then limped off injured and could miss Wednesday's Group Three game against the Poles.
Slovenia though, could have been ahead by that stage as they started brighter, looked well organised at the back and played some attractive quick-passing football on the break.
Milivoje Novakovic had a good chance after seven minutes when he rounded goalkeeper Robert Green but then shot just over the bar after being forced wide.
England eventually took control after Rooney's goal and twice went close when John Terry sent a header against the bar from a Steven Gerrard corner and Rooney hit a post from two metres out after another set-piece.
They deserved to double their lead after 63 minutes when Aaron Lennon, who replaced the largely ineffective Shaun Wright-Phillips at half-time, found his Tottenham Hotspur team mate and fellow sub Defoe with a neat pass for the striker to score with a sharp shot from the edge of the box.
Defoe, who also scored both goals in a 2-2 draw with Netherlands last month, has scored seven for club and country in a superb start to the season.
The last third of the match was played out at little more than walking pace before Ljubijankic gave the visitors a deserved consolation with his well-taken header.