Fourier synthesis of optical potentials for atomic quantum gases