Dummy variable regressor OLS coefficient formula
To start, let's derive $\hat{\beta}$. As you note:

$$\hat{\beta} = \frac{\sum(D_i - \bar{D})(y_i - \bar{y})}{\sum (D_i - \bar{D})^2} $$

The key to evaluating this is to recognise that $D_i$ is a binary variable that equals $0$ or $1$. Thus, we can use standard results on Bernoulli random variables.

To evaluate the numerator, note that if $D$ is Bernoulli distributed:

$$ \mathrm{Cov}[D, y] = \mathbb{E}[Dy] - \mathbb{E}[D]\mathbb{E}[y] = \mathrm{P(D=1)}\mathbb{E}[y|D=1] - \mathrm{P(D=1)}\mathbb{E}[y] $$

By the sample analogue of this:

$$ \frac{\sum(D_i - \bar{D})(y_i - \bar{y})}{n} = \bar{D}(\bar{y}_{D_i=1}-\bar{y})$$

To evaluate the denominator, note that if $D$ is a Bernouilli random variable:

$$\mathrm{Var[D]} = \mathrm{P(D=1)}[1-\mathrm{P(D=1)]}$$

Sample analogue:

$$\frac{\sum (D_i - \bar{D})^2}{n} = \bar{D}(1 - \bar{D})$$

We therefore see that:

$$\hat{\beta}=\frac{\bar{D}(\bar{y}_{D_i=1}-\bar{y})}{\bar{D}(1 - \bar{D})}
= \frac{\bar{y}_{D_i=1}-\bar{y}}{1 - \bar{D}}
\\ = \frac{\bar{y}_{D_i=1}-(\bar{y}_{D_i=1}\bar{D}+\bar{y}_{D_i=0}(1-\bar{D}))}{1 - \bar{D}}
\\ = \bar{y}_{D_i=1} - \bar{y}_{D_i=0}$$

which is what we wanted to show.

It is then trivial to derive:

$$\hat{\alpha} = \bar{y} - \bar{D}\hat{\beta} =\bar{y}_{D_i=1}\bar{D}+\bar{y}_{D_i=0}(1-\bar{D}) - \bar{D}(\bar{y}_{D_i=1} - \bar{y}_{D_i=0}) = \bar{y}_{D_i=0}$$