Active materials are capable of converting free energy into mechanical work to produce autonomous motion, and exhibit striking collective dynamics that biology relies on for essential functions. Controlling those dynamics and transport in synthetic systems has been particularly challenging. Here, we introduce the concept of spatially structured activity as a means to control and manipulate transport in active nematic liquid crystals consisting of actin filaments and light-sensitive myosin motors. Simulations and experiments are used to demonstrate that topological defects can be generated at will, and then constrained to move along specified trajectories, by inducing local stresses in an otherwise passive material. These results provide a foundation for design of autonomous and reconfigurable microfluidic systems where transport is controlled by modulating activity with light.