$$\newcommand{\slashed}[1]{#1\!\!\!/}$$
Since $\Gamma_\mu$ has a Lorentz index $\mu$, it must involve $\gamma_\mu$, $p_\mu, p'_\mu$ (or equivalently, the linear combinations $p_\mu\pm p'_\mu$) such that: $$\Gamma^\mu=\gamma^\mu A(p,p')+(p^\mu+p'^\mu)B(p,p')+(p^\mu-p'^\mu)C(p,p')\tag{1}$$ where the coefficients $A, B$ and $C$ could involve Dirac matrices dotted into vectors i.e., $\slashed p,\slashed p'$. Notice that, $\Gamma_\mu$ is sandwiched between $\bar u(p')$ and $u(p)$. Since $$\slashed{p} u(p) = mu(p) ,~ \hspace{1cm} \bar u(p')\slashed p' = \bar u(p')m\tag{2}$$ we can write the coefficients in terms of ordinary numbers without loss of generality.
Next we can use the Ward Identity $q_\mu\Gamma^\mu=0$ which would further restrict the form of $\Gamma_\mu$. From the diagram $q=p-p'$ and hence the third term $$q\cdot (p'-p)=p'^2-p^2=m^2-m^2=0\tag{3}$$ because the incoming (and outgoing) particles are on shell but the photon is off-shell i.e. $q^2\neq 0$. The first term also vanishes when evaluated between $\bar u(p')$ and $u(p)$ we get, $$\bar u(p^\prime)\slashed q u(p)=\bar u(p^\prime)(\slashed p'-\slashed p) u(p)=\bar u(p')(\slashed p'-\slashed p) u(p)=0\tag{4}$$ Therefore for the Ward identity to hold $C=0$. Hence, $$\Gamma^\mu=\gamma^\mu A(p,p')+(p^\mu+p'^\mu)B(p,p')\tag{5}$$
$q^2$ need not be zero for a virtual photon i.e, need not be on-shell. Note that, $q^2=p-p^\prime$ or $$q^2=p^2+p^{\prime2}-2p\cdot p^\prime=2(m^2-p\cdot p^\prime)\tag{6}.$$ Since both sides are Lorentz invariant, their values are identical in all inertial frames. In particular, if we use the rest frame of the initial electron i.e., $p^\mu=(m,\textbf{0})$ and $p^{\prime}_\mu=(E^\prime,-\textbf{p}^\prime)$, $$q^2=2m(m-E^\prime)<0\tag{7}$$ since $E^\prime>m$.