I'm looking for an old novel published in, I think, the late 60s or early 70s. The protagonist is a starship captain.
The novel begins with his trial for the possible destruction of an interstellar colony. The starship he commanded was to visit different colonies to see how they were doing. When he entered the system, another starship was detected leaving. They investigated the colony but found no one. The captain took a shuttle and detected a signal that guided him to a cave where he found a few survivors. However, they had been surgically/genetically modified into grotesque monsters (one eye instead of two, more arms and legs, etc). They begged him to kill them and he did. After the ship returned to Earth, he was placed on trial and forced to reveal this information.
The only other thing I remember is that the trial took place in San Francisco. There was also at least one sequel to the novel.