Man pleads guilty to killing girlfriend