A West Yorkshire police officer has denied sexually abusing a young girl for four years when he was a youth.