Exact solution of the scalar wave equation with focused Gaussian gain