A Thames Valley Police officer has been spared jail after admitting to sending a picture of his genitals to whom he thought was a 12-year-old girl.