As Davide suggested, put $F(x)=\displaystyle\int_0^x f(t)dt$. Then $F(0)=\displaystyle\int_0^0 f(t)dt=0$ and $F(1)=\displaystyle\int_0^1 f(t)dt=2a$ since $a=\displaystyle\frac{1}{2}\int_0^1 f(t)dt$, which shows that $F(0)=0\leq a\leq 2a=F(1)$. Note that $F$ is continuous since $f$ is integrable, by Intermediate value theorem, there exists $c\in [0,1]$ such that $$\int_0^c f(t)dt=F(c)=a.$$
To prove that $c$ is unique, suppose by contradiction that there exists $c'\neq c$ such that $F(c')=a$. By definiton of $F$, we have $$\int_0^{c'} f(t)dt=F(c')=a=F(c)=\int_0^{c} f(t)dt.$$ Without loss of generality, we assume $c. Hence, we have $\displaystyle\int_c^{c'} f(t)dt=0$. By this is a contradiction, because by assumption $f(x)>M$ we have $\displaystyle\int_c^{c'} f(t)dt\geq M(c'-c)>0$.
Note: In my previous answer, I made a mistake by assuming that $f$ is continuous. Thank you for Didier pointing out the mistake.
Note added: Proof of $F$ being continuous: $$|F(x)-F(y)|=\left|\int_0^{x} f(t)dt-\int_0^{y} f(t)dt\right|\leq\int_{[x,y]}|f(t)|dt \rightarrow 0\mbox{ as }x\rightarrow y$$ since $f$ is integrable.