Let $f(x)=a_nx^n+\ldots+a_1x+a_0$ (where all $a_i$'s are from $F$) be such that $f(d)=0$, and $f$ is the smallest degree polynomial from $F[x]$ with that property. This means that:
$$a_nd^n+\ldots+a_1d+a_0=0$$
Now:
- If $a_0=0$, this means that already $(a_nd^{n-1}+\ldots+a_1)d=0$, but as $d\ne 0$ and $D$ is an integral domain, we conclude $a_nd^{n-1}+\ldots+a_1=0$, i.e. there is a smaller degree polynomial $g(x)=a_nx^{n-1}+\ldots+a_1$ such that $g(d)=0$ - a contradiction.
- If $a_0\ne 0$, then there is $a_0^{-1}\in F$, so you can now calculate that:
$$-a_0^{-1}(a_nd^{n-1}+\ldots+a_1)d=1$$
which means $d$ is invertible and $d^{-1}=-a_0^{-1}(a_nd^{n-1}+\ldots+a_1)$.