Top US military official apologizes for role in Trump photo op