In this paper, we study an optimal control problem for the mixed boundary value problem for an elastic body with quasistatic evolution of an internal damage variable. We suppose that the evolution of microscopic cracks and cavities responsible for the damage is described by a nonlinear parabolic equation. A density of surface traction p acting on a part of boundary of an elastic body Ω is taken as a boundary control. Because the initial boundary value problem of this type can exhibit the Lavrentieff phenomenon and non-uniqueness of weak solutions, we deal with the solvability of this problem in the class of weak variational solutions. Using the convergence concept in variable spaces and following the direct method in calculus of variations, we prove the existence of optimal and approximate solutions to the optimal control problem under rather general assumptions on the quasistatic evolution of damage.