First, for a Dirac operator $D$, it extends to a Fredholm operator \begin{equation} D^+\colon H^1(M,E^+)\to L^2(M,E^-), \end{equation} see Lawson-Michelsohn "Spin Geometry", Page 193, Theorem 5.2.
Also, a classical result in functional analysis says the index of the Fredholm operator is locally constant, see for instance Lemma 16.18 of https://ocw.mit.edu/courses/18-965-geometry-of-manifolds-fall-2004/8a7e4dd837d1bdd6988e0330babb8c5e_lecture16_17.pdf
Therefore, using the above lemma for the family $t\in [0,1]\mapsto tD_0^++(1-t)D_1^+$, the index is constant as required.