The 37-year-old former correction officer allegedly had intercourse with the inmate in a caseworker's office while on duty.