Say the support of $f$ is contained in $[-M,M]$. Let $g(x) = f(x) + f(-x)$ and note that it is enough to show that $g=0$ on the interval $[0,M]$. It's clear that
$$
\int_0^M g(x) e^{-tx^2} \,dx \ = \ \int_\mathbb{R} f(x) e^{-tx^2} \,dx \ = \ 0
$$
for all $t \geq 0$. Let $\mathcal{F} = \operatorname{span} \{ x \mapsto e^{-tx^2} : t \geq 0 \} \subseteq C([0,M],\mathbb{R})$. We see that $\mathcal{F}$ is closed under linear combinations by definition, and closed under multiplication because $e^{-tx^2} e^{-sx^2} = e^{-(t+s)x^2}$. We also see that $\mathcal{F}$ contains a nonzero constant by taking $t=0$. Finally, it's clear that $\mathcal{F}$ separates points because each $x \mapsto e^{-tx^2}$ is strictly decreasing on $[0,M]$. Therefore the Stone-Weierstrass theorem implies that $\mathcal{F}$ is dense in $C([0,M],\mathbb{R})$, so by the equation above and a standard argument it follows that $\int_0^M g(x) \phi(x) \,dx = 0$ for all continuous $\phi$ and therefore $g = 0$ on $[0,M]$ as desired.