Montana man pleads guilty in Miles City, Missoula killings