Bayern’s third successive win moves them up to eighth into the automatic qualification places on 12 points, while Shakhtar are 27th with four points, three points off the playoffs. Bayern had suffered defeats in both of their previous away games in the competition and went behind after five minutes when Oleksandr Zubkov's through ball found Kevin, who cut inside Kim Min-jae before sending his shot into the far corner.
The German side were on level terms just six minutes later. Olise lost possession in the area but the ball fell kindly to his teammate Konrad Laimer who took a touch to control it and then smashed his effort into the roof of the net.
Shakhtar had the chance to go back in front but Georgiy Sudakov put his shot wide after an excellent pass from Kevin had teed him up almost from the penalty spot.
Bayern went down the other end, Jamal Musiala took the ball into the box and laid a pass off to Thomas Mueller who made no mistake with a simple slotted finish on the stroke of halftime.
Shakhtar put pressure on Bayern at the start of the second half but were unable to find a second goal before the visitors eased to victory.
Bayern thought they had extended their lead when Musiala volleyed home from a corner but the goal was chalked off for a foul on the keeper. However, minutes later the referee pointed to the spot for a foul by Alaa Ghram on substitute Sacha Boey.
Olise stepped up in the 70th minute and although keeper Dmytro Riznyk went the right way the ball was powered into the top corner to put Bayern well and truly in the driving seat.
Musiala got the goal he deserved for an excellent performance three minutes from time, collecting a loose ball in the box and firing past Riznyk.
There was still time for some Olise magic in added time as he skilfully weaved his way through the Shakhtar defence before coolly finding the bottom corner with his shot.