Do science fiction stories ever inspire new scientific theories?
Not that I know of. It is far more common for scientific theories to inspire science fiction. Scientists obtain new ideas from a complex brew of many influences, some of which can include dreams, hunches, analogies, and themes drawn from many sources including literature. I know of no specific theory in physics or astronomy that owes its stimulus directly to a science fiction story, but I can assure you that many scientists are avid science fiction readers. Clearly there is something about speculating about the future which inspires scientists and ignites their imagination. Since imagination is the fuel of new ideas, I guess you could say that indirectly the entire genra of science fiction writing has helped scientists loosen the shackles a bit and encouraged their flights of creativity!