Prove $f\in L_2$ if $\langle f,g\rangle< C\|g\|_{L_2}$ for any $g\in D$ and $\overline{D}=L_2$ 
Let $D$ be a subset of and dense in $L_2$. If $\langle f,g\rangle<C\|g\|_{L_2}$ for a constant $C$ and any $g\in D$, then $f$ must be in $L_2$.

I read this statement in a paper. I think it is right, because the following argument makes sense. The fact that $\langle f,g\rangle< C\|g\|_{L_2}$ for any $g\in D$ implies that $f$ is a linear functional on $L_2$. It is known that the dual of $L_2$ is $L_2$. Thus $f$ should be in $L_2$. This argument is not rigorous and I think the duality of $L_2$ is a bit too advanced for this statement. Could anyone give a tip of an elementary proof that does not require the duality property?
If needed, $D$ is the set of compact support functions in $C^{\infty}$ and $\langle f,g\rangle=\int f\bar{g}$. We can consider the problem in $L_2(\mathbb{R})$. But I guess that what $D$ is exactly does not matter, except that it is dense in $L_2$. 

As explained in the comments, the result is not true as stated. For a different counterexample, take $f \in L^1(0,1) \setminus L^2(0,1)$ and $D = L^\infty(0,1)$.
However, it is true if you require additionally $\langle f, g\rangle \le C \|g\|_{L^2}$. Then, $f$ is continuous on $(D,\|\cdot\|_{L^2})$ and can be extended uniquely to a functional on $L^2$ by density of $D$. Hence, there is $F \in L^2$ with $\langle f, g\rangle = \langle F, g\rangle$ for all $g \in D$. Now, you can use the density of $D$ again to get $f = F$.
