Let $(M_t, \mathcal{F}_t, 0 \leq t < \infty)$ be a martingale. For bounded stopping time $T$, we can deduce from Doob's Optional Sampling that $\mathbb E(M_T)=\mathbb E(M_0)$. Now let $T$ be a stopping time with finite expectation, i.e. $\mathbb E(T)<+\infty$. Can we deduce using $T\wedge n$ and perhaps Lebesgue's Dominated Convergence Theorem that $\mathbb E(M_T)=\mathbb E(M_0)$? If not, is there a sufficient condition for this to be true?
This question arose in studying Brownian motion. For $\tau:=\inf\{t>0:B_0=a,\,B_t=-b\}$ stopping time, we wish to show $\mathbb E(\tau)=ab$. One solution suggests $\mathbb E(B_\tau^2-\tau)=0$ by Doob's Optional Sampling Theorem. I wish to justify this claim with the above.