Effect of optical lattice on rotating Bose–Einstein condensates in synthetic magnetic field