A former Boston Transportation Department manager pleaded guilty on Monday to charges of possessing child pornography and avoided jail time. James Mansfield, 48, of Charlestown, entered his plea in Suffolk Superior Court, and his 2½-year jail term was suspended for five years, District Attorney Daniel F. Conley’s office said Thursday. Mansfield must register as a sex offender, have no contact with minors other than his own children, and stay at least 100 feet from a school near his home and at least 1,000 feet from other schools and places where children gather, among other conditions of his release, Conley’s office said.