In this work we present the first systematic framework to sculpt active nematic systems, using optimal control theory and a hydrodynamic model of active nematics. We demonstrate the use of two different control fields, (i) applied vorticity and (ii) activity strength, to shape the dynamics of an extensile active nematic that is confined to a disk. In the absence of control inputs, the system exhibits two attractors, clockwise and counterclockwise circulating states characterized by two co-rotating topological + 1/2 defects. We specifically seek spatiotemporal inputs that switch the system from one attractor to the other; we also examine phase-shifting perturbations. We identify control inputs by optimizing a penalty functional with three contributions: total control effort, spatial gradients in the control, and deviations from the desired trajectory. This work demonstrates that optimal control theory can be used to calculate nontrivial inputs capable of restructuring active nematics in a manner that is economical, smooth, and rapid, and therefore will serve as a guide to experimental efforts to control active matter.