You want a version of the classical Müntz–Szász theorem for the space $L^2([0,1])$ (which is, incidentally, the case considered initially by Szász). Here is a nice paper on the situation for $L^p([0,1])$ spaces:, always for the span of monomials (with real exponents allowed) http://www.math.tamu.edu/~terdelyi/papers-online/Fullmuntz.pdf