Toprak Razgatlioglu closed the gap on Alvaro Bautista at the top of the Superbike World Championship after winning the Superpole race.