Officer accused of having sex with teenage girl