A New York City police officer arrested Thursday on a child pornography charge used social media to send sexually explicit messages to dozens of minors, persuading some of them to send him nude pictures, asking for phone sex and sometimes encouraging self-harm, federal prosecutors said.