Without any further conditions on $f$ besides continuity and bounded variation, the best you can do is to set the upper limit of $I_1$ to be that $y$ such that $\text{Var}_{[0, y]} f = 2M$ (or $a$ if the variation is always less than $2M$), and take $c = y$, so that $I_3$ vanishes.
This gives us the upper bound
$$I \leq 2(a-c)M + \int_{0}^c \text{Var}_{[0, s]} f \, ds,$$
and this is sharp, as displayed by say the function $f$ on $[0, a]$ given by
$f(0) = -C;$ $f = C$ on
$f(x) = C$ for $[\frac{a}{2}, a]$$x \in [\frac{a}{2}, a]$,
and linearly interpolated between $0, \frac{a}{2}$$0$ and $\frac{a}{2}$ otherwise, where $C$ is a positive constant.