US entrepreneur Bill Gates has apologized to Gates Foundation staff for harming the group's reputation through ties to Jeffrey Epstein.