Q: For $0 < \alpha < 1$, construct an open set $E \subset [0,1]$ which is dense in $[0,1]$ and $m(E) = \alpha$.
My first guess is an open covering of the rationals with each rational covered by an open interval of length $\alpha/2^k$: such as $E = \cup_k (r_k, r_k + \alpha/2^k)$. Then $m(E) \le \sum \alpha/2^k = \alpha$. But that gives $m(E) \le \alpha$ not $m(E) = \alpha$. What is a better answer that gives $m(E) = \alpha$?
The attempted $E$ in your Q will have measure $\beta$ with $0<\beta<\alpha .$ Because if $r_k\in \Bbb Q\cap [0,1)$ then there exists (infinitely many) $r_j\in (r_k,r_k+\alpha 2^{-k})\cap (0,1)$ so the $k$-th and $j$-th intervals overlap in a subset of $[0,1]$ of measure $>0.$
Take that $E$ and let $f(x)=m(E\cup (0,x)\;)$ for $x\in [0,1].$ Now $f$ is continuous, even Lipschitz-continuous, because $0\le x<y\le 1\implies 0\le f(y)-f(x)=m(\, [x,y)\setminus E\,)\le m(\,[x,y)\,)=y-x.$
And $f(0)=\beta$ and $f(1)=1.$
So for some $x\in (0,1)$ we have $f(x)=\alpha.$
Addendum. The $E$ of your Q should be amended to $E= (0,1)\cap (\,\cup_k(r_k,r_k+\alpha 2^{-k})\,)$ to ensure that $E\subset (0,1).$