Lewis, who made his first-team breakthrough as a right-back last season, had a hand in Phil Foden's opening goal and proved City's main driving force throughout.
City controlled the first half and led at the break through Foden's 25th-minute strike but they were pegged back after the restart by Lois Openda.
The second half was a frustrating affair with Erling Haaland missing several chances and Foden hitting the bar but Alvarez made the breakthrough with a stunning effort on 84 minutes.
Doku wrapped up a second successive win in Group G in injury time and after back-to-back defeats domestically, Guardiola was pleased to get back to winning ways.
He said: "Three or four days ago it was no progress because we lost in Wolves. It was important to break that.
"We played a fantastic game in all departments. We conceded two or three transitions in the second half but it's normal. When a team is able to make a lot of passes early on, very nice things are going to happen in the game.
"The guys who came from the bench, the contribution they have done is the key point. Everyone helped each other. I am really satisfied. It was a tough game."