Solitons and vortices obtain widespread attention in different physical systems as they offer potential use in information storage, processing, and communication. In exciton-polariton condensates in semiconductor microcavities, solitons and vortices can be created optically. However, dark solitons are unstable and vortices cannot be spatially controlled. In the present work we demonstrate the existence of stable dark solitons and vortices under non-resonant incoherent excitation of a polariton condensate with a simple spatially periodic pump. In one dimension, we show that an additional coherent light pulse can be used to create or destroy a dark soliton in a controlled manner. In two dimensions we demonstrate that a coherent light beam can be used to move a vortex to a specific position on the lattice or be set into motion by simply switching the periodic pump structure from two-dimensional (lattice) to one-dimensional (stripes). Our theoretical results open up exciting possibilities for optical on-demand generation and control of dark solitons and vortices in polariton condensates.