Soon after Chief Executive Dara Khosrowshahi joined Uber Technologies Inc. last fall and pledged to overhaul its workplace culture following allegations it overlooked harassment and chauvinism, the startup had to decide what to do about a senior executive accused of sexual misconduct in the office.