If the Lebesgue differentiation theorem is applicable, here is a quick solution.
Let $a, b \in [0, 1]$ be Lebesgue points of $f$, and let $I_1, I_2 \subseteq [0, 1]$ be intervals satisfying $a \in I_1$, $b \in I_2$, and $m(I_1) = m(I_2) < \frac{1}{6}$. Since $m(I_1\cup I_2) < \frac{1}{3}$, we can find $E \subseteq [0,1]\setminus(I_1\cup I_2)$ satisfying $m(E\cup I_1) = m(E\cup I_2) = 2/3$, and so,
$$ \int_{E\cup I_1} f = 0 = \int_{E \cup I_2} f. $$
From this,
$$ \frac{1}{m(I_1)}\int_{I_1} f = \frac{1}{m(I_2)} \int_{I_2} f. $$
So by letting $m(I_1) = m(I_2) \to 0$, it follows that $f(a) = f(b)$.
Since the set of all Lebesgue points of $f$ has full measure in $[0, 1]$, this implies that there exists a constant $c$ such that $f(x) = c$ for a.e. $x \in [0, 1]$. The value of $c$ is easily determined to be zero, and therefore $f$ is zero a.e.