$\mathbb{E}[M_{\tau+\theta}M_{\tau}]=\mathbb{E}[M_{\tau}^2]$ 
Let $\{M_t\}_{t \geq 0}$ be a martingale with mean zero and filtration $\{\mathcal{F}_t\}_{t \geq 0}$.
I want to show that if $\tau$ and $\theta$ are stopping times bounded by $T < \infty$ then
$$\mathbb{E}[M_{\tau+\theta}M_{\tau}]=\mathbb{E}[M_{\tau}^2].$$

If I had $\mathbb{E}[M_{t+s}M_{t}]$ with $s,t \in \mathbb{R^+}$, I would know how to solve it:
$$\mathbb{E}[M_{t+s}M_{t}]=\mathbb{E}[\mathbb{E}[M_{t+s}M_{t} | \mathcal{F}_t]]=\mathbb{E}[M_{t}\mathbb{E}[M_{t+s}|\mathcal{F}_t]]=\mathbb{E}[M_{t}^2].$$
But I have stopping times instead of deterministic times.
I think I have to use the optional stopping theorem but I'm not sure how. I might be missing some hypothesis on the martingale (so that we can apply the optional stopping theorem) so , is there any assumption I have to make about $\{M_t\}_{t \geq 0}$? (for example convergence in $L^1$)
 A: You are on the right track. To change your argument to use stopping times you just need to change the $\sigma$-algebra against which you condition. We can do that via the following proposition.
Proposition Let $\{X_t\}$ be a right-continuous martingale for which $X_\infty = \lim_{t \to \infty} X_t$ exists almost surely. If $S$ and $T$ are two stopping times with $S \leq T$, then $X_T$ is integrable and $\mathbb{E}(X_T | \mathcal{F}_S) = X_S$ almost surely.
This proposition can be proven (with a bit of work, see Theorem 77.5 in Diffusions, Markov Processes, and Martingales by Rogers and Williams) from the optional stopping theorem. Now, your result follows by the following computation:
$$\mathbb{E}(M_{\tau + \theta} M_\tau) = \mathbb{E}[\mathbb{E}(M_{\tau + \theta} M_\tau \, | \, \mathcal{F}_\tau)] = \mathbb{E}[M_\tau \mathbb{E}(M_{\tau + \theta}  \, | \, \mathcal{F}_\tau)] = \mathbb{E}(M_{\tau}^2)$$
Where we have used the fact that $M_\tau$ is $\mathcal{F}_\tau$-measurable in the second equality and the proposition in the third equality. To see that $M_\tau$ is $\mathcal{F}_\tau$-measurable, fix $t \geq 0$, let $r(\omega) = (\tau (\omega ), \omega)$, and let $M_{(t)}^*$ be the restriction of $M$ to $[0,t] \times \tau^{-1}([0, t])$. Let $\mathcal{F}_t^*$ be $\mathcal{F}_t$ relativised to $\tau^{-1}([0,t])$. We then note that for an open set $U \subseteq \mathbb{R}$, we have: $$\{ M_\tau (\omega) \in U \} \cap \{ \tau \leq t \} = \left(M_{(t)}^* \circ r \right)^{-1}(U) \in \mathcal{F}_t^* \subset \mathcal{F}_t$$
Since this holds for all $t \geq 0$, we conclude $M_\tau$ is $\mathcal{F}_\tau$ measurable.
