It is known that $\int_\mathbb{R}e^{-tx^2}dx=\sqrt{\pi/t}$. What about $\int_\mathbb{R}e^{-t(x+ai)^2}dx$ for $a\in\mathbb{R}$? Is it still also $\sqrt{\pi/t}$?
I can't simply change the variable $y=x+ai$, because then the domain of integration would also change.
Yes it is. Consider the following contour integral in the complex plane:
$$\oint_C dz \: e^{-t z^2}$$
where $C$ is a rectangle having vertices at $z=-R$, $z=R$, $z=R + i a$, and $z=-R + i a$. The contour integral is then
$$\int_{-R}^R dx \, e^{-t x^2} + i \int_0^a dy \, e^{-t (R+i y)^2} \\ + \int_R^{-R} dx \, e^{-t (x+i a)^2} + i \int_a^0 dy \, e^{-t (-R+i y)^2}$$
It should be clear that the second and fourth integrals vanish as $R \to \infty$. Further, by Cauchy's integral theorem, the contour integral is zero as there are no poles inside $C$. Therefore
$$\int_{-\infty}^{\infty} dx \, e^{-t (x+i a)^2} = \int_{-\infty}^{\infty} dx \, e^{-t x^2}$$
as was to be shown.