A 47-year-old ex-prison guard from Kapolei pleaded guilty Monday to raping female inmates while he worked at the Federal Detention Center Honolulu, according to a plea agreement with the U.S.