RoboPol: connection between optical polarization plane rotations and gamma-ray flares in blazars