The only way is to redesign the mechanics of the motor. Skew the slots in the rotor, and the transitions will be far more gentle.
Alternatively, if you don't want to do that, build the drive electronics into a feedback circuit which reads motor rotation from a Gray code encoder mounted on the shaft.
Gray code looks like binary but, unlike binary, only one bit changes per transition, which makes it ideal for motion sensing. You buy it as a disk, with or without the optical sensors, which you mount on the motor shaft. You need to specify the resolution you need, which determines the number of bits.