So... yes, you can "publish" a Star Wars fan fiction. As long as you do not profit from it and make it known that it's not a real authorized work of Star Wars.
This is done all the time and there are communities on the internet that are dedicated to publishing fan fiction. Before the internet, there were fan magazines where fan fiction was often published (I don't know about the magazine's profit resources... they may have been free or received after membership dues were paid... It's an old art and I just don't know how the model works).
If you want to make money off of this, than pitching Lucas and Disney is the way to go, but if they accept, they do have creative control over the product and may force you to add or drop things you don't want. Normally, they are contracted to write a story that the creative team wants to tell, not looking for new stories. So while they may like your work, they may hire you to write the "Jar Jar Binks Holiday Special" and give your work no time of day.
If you're interested in writing stories for Star Wars, though, it may be prudent not to send them your work. Greg Weisman (a screen writer famous for Gargoyles, Young Justice, Spectacular Spider-man (animated)) and other cartoons advises don't send them your work for their products. Many people hiring writers won't look at fan fiction because this opens them up to copyright lawsuits... they may hold the rights to the product and can sue you if they feel you're profiting on that... but that's your story and you hold that copyright (copyrights go to the creator of a work, and if you are hired you will have a thing in your contract saying you sign all your copyright work done for the company over to them) and you can actually sue them. Even if Star Wars can show they were planning something similar before you sent in your stuff, it's a messy legal battle they don't want and it's reasonable that you could win (Copyright infringement is a civil offense in the States, not a criminal one, so the standard of proof is a lot lower in assessing your claim. If you published first, there could be a preponderance of evidence that it was stolen.).
Rather, if you want a Job writing Star Trek, send your fan fic to Star Wars folks and write a Star Trek fan fic for Star Wars job seeking. It demonstrates your style and your ability without any messy copyright stuff. Star Trek borrows very little for a Star Wars story to say it was stolen... despite the rivalries, the two franchises have little in common beyond space ships.