Indirect contributions of mutations underlie optimization of new enzyme function