Optimality in DNA repair