Denote the fixed points by $\mu$ and $\eta$ ($\mu\ne\eta$) and define
$$\varphi_{\mu}(z)=\frac{\mu-z}{1-\bar\mu z},$$then $\varphi_\mu$ is an automorphism of $D(0,1)$ such that $\varphi_{\mu}(0)=\mu$, $\varphi_{\mu}(\mu)=0$ and $\varphi_{\mu}\circ \varphi_{\mu}=\rm{Id}_{D(0,1)}$. (You can check this or see it in Stein's book.)
Now, it follows that
$$\varphi_{\mu}\circ f\circ\varphi_{\mu}(0)=0\quad \text{and}\quad\varphi_{\mu}\circ f\circ \varphi_{\mu}\circ\varphi_{\mu}(\eta)=\varphi_{\mu}(\eta).$$
Since $\varphi_{\mu}\circ f\circ\varphi_{\mu}$ is a holomorphic map from $D$ to $D$ and $\varphi_{\mu}(\eta)\ne 0$, by Schwarz Lemma, it follows that $\varphi_{\mu}\circ f\circ\varphi_{\mu}=\rm{Id_{D}}$, hence $f=\rm{Id_{D}}$.