You can also use a variable change, but you have to be a bit careful about clipping, because $a$ is not a priori a multiple of $T$ :
First, let come back to an integral near $[0,T]$ :let $N=\lfloor \frac{a}{T}\rfloor$, such that $0 \leq a - NT < T$, you can do the variable change $u = x - NT$, $f$ being periodic then $f(u)=f(x)$ and $$\int_a^{a+T} f(x)dx = \int_{a-NT}^{a-NT+T} f(u)du$$
Now, you know that $0 \leq a-NT \leq T \leq a-NT+T$ . So, $a-NT+T$ is greater than $T$, thus you need to cut the "excedent", shift it again, and restick it to your main integral : $$\int_{a-NT}^{a-NT+T} f(x)dx = \int_{a-NT}^{T} f(x)dx + \int_{T}^{a-NT+T} f(x)dx$$
Do a variable change of $v=x-T$ again in the second integral, it's still invariant by $f$ being just a translation by a multiple of the period, and restick the two parts :
$$\int_{a-NT}^{T} f(x)dx + \int_{T}^{a-NT+T} f(x)dx=\int_{a-NT}^{T} f(x)dx + \int_{0}^{a-NT} f(v)dv = \int_{0}^{T}f(x)dx$$