We prove that every Stieltjes problem has a solution in Gel'fand-Shilov spaces Sβ for every β>1. In other words, for an arbitrary sequence {μn} there exists a function ϕ in the Gel'fand-Shilov space Sβ with support in the positive real line whose moment ∫0∞xnϕ(x)dx=μn for every nonnegative integer n. This improves the result of A. J. Duran in 1989 very much who showed that every Stieltjes moment problem has a solution in the Schwartz space S, since the Gel'fand-Shilov space is much a smaller subspace of the Schwartz space. Duran's result already improved the result of R. P. Boas in 1939 who showed that every Stieltjes moment problem has a solution in the class of functions of bounded variation. Our result is optimal in a sense that if β≤1 we cannot find a solution of the Stieltjes problem for a given sequence.