Officer gets life in prison for rape