Look at the values of $d_1$ and $d_2$ when $t \rightarrow T$:
$$d_1 = \frac{\ln(S/K) + \left(r - D + \dfrac{1}{2}\sigma^2\right)\tau}{\sigma \sqrt{\tau}}$$
and
$$d_2 = d_1 - \sigma \sqrt{\tau}$$
with $\tau = T -t$.
Therefore, $t \rightarrow T$ is equivalent to $\tau \rightarrow 0$
$d_1 \sim \frac{\ln(S/K) }{\sigma \sqrt{\tau}} \rightarrow + \infty$
$d_2 \sim d_1\rightarrow + \infty$
Therefore,
$$C(S,\tau) = S e^{- D \tau} N (d_1) - K e^{- r \tau} N (d_2) \rightarrow (S-K)$$
as $N(d_i) \rightarrow 1$ for $i \in \{ 1,2\}$.
$d_1 \sim \frac{\ln(S/K) }{\sigma \sqrt{\tau}} \rightarrow - \infty$
$d_2 \sim d_1\rightarrow - \infty$
Therefore,
$$C(S,\tau) = S e^{- D \tau} N (d_1) - K e^{- r \tau} N (d_2) \rightarrow 0$$
as $N(d_i) \rightarrow 0$ for $i \in \{ 1,2\}$.
$d_1 = \frac{\left(r - D + \dfrac{1}{2}\sigma^2\right)\sqrt{\tau}}{\sigma} \rightarrow 0$
$d_2 \rightarrow 0$
Therefore,
$$C(S,\tau) = S e^{- D \tau} N (d_1) - K e^{- r \tau} N (d_2)$$
$$C(S,\tau) = \left( S - K \right) \dfrac{1}{2} \rightarrow 0$$
as $N(d_i) \rightarrow \dfrac{1}{2}$ for $i \in \{ 1,2\}$ and $S = K$ by assumption.
Putting everything together, you see that the price of the call tends to its payoff
$$(S-K)^+$$
when the time $t$ is "infinitely" close to the maturity of the call $T$.