Can system logs tell me when I closed my Macbook?
Without loss of generality assume $f\neq 0$. Since $\int_0^1 f(x)\,\mathrm{d}x=0$, $f(x)$ can neither be strictly positive nor strictly negative on $[0,1]$, hence $f$ has at least one zero.
Suppose then that $f$ has only one zero, at $a$, and that $f(x)<0$ for $x<a$ and $f(x)>0$ for $x>a$ (this can always be accomplished by switching to $-f$ if necessary). Now $$\int_0^1(x-a)f(x)\,\mathrm{d}x = \int_0^1xf(x)\,\mathrm{d}x-a\int_0^1f(x)\,\mathrm{d}x = 0$$ by assumption. However, $(x-a)f(x)$ is strictly positive except at $a$, a contradiction. Hence, $f$ has at least two zeroes.