The version of the Schwarz Lemma I know says that for holomorphic $g:D\rightarrow D$ , if in addition to $g(0)=0$ you have $|g(c)| = |c| $ for at least one $c\neq 0$ or $|g'(0)|=1$, then $g$ is a rotation.
You may apply the latter again to $g(z)=f\circ f(z)$, i.e. $g'(0)=f'(f(0))f'(0)= f'(b)f'(0)=1$. So g(x)=ax for some complex number $a$ s.t. $|a|=1$, in this case clearly $a=1$. (Your heading seems to indicate you figured that out already, but I'm not sure)
Consequently, $f$ is onto and one-one in $D$ (why?), hence $f(z)$ is a biholomorphic map $D\rightarrow D$. These are well known, and I assume you know them, too, since this is what you usually prove using the Schwarz lemma and the reason to introduce the lemma. They are of the form $f(z)= \frac{az+b}{\bar{a}z + \bar{b}} \,\,, a,b \in \mathbb{C}, |a|^2 -|b|^2 =1$ If you know that the rest is just calculation.