I can really relate to a lot of the stuff you're saying, especially the stuff about practice time turning into long jam sessions where you don't really improve. It sounds like you're got a good leg up in that you're recognizing what your weaknesses are, and you've got the desire to improve. As someone else once said, if you want things to change, you need to do something different.
-First things first, you don't need to stop song writing. However, you do need to acknowledge (which you already have) that song writing is not an excuse for sloppy playing and poor rhythm. The trick is to stay within your ability at all times. No one is going to fault you for playing a simple guitar bit if its played really well, with consistent tempo & controlled rhythm. However, a poorly played guitar bit isn't going to win over an audience no matter how complicated it is. No one is going to say "wow, that really sounded like crap, but hey, it was a tricky thing to play, so he's actually really good".
-Set clear specific short, medium and long range goals for your practice time. What do you want to accomplish or work on for your next practice session? What song or skill would you like to learn or master in the next month? Where would you like your guitar playing to be in a year from now? Ask yourself these questions, set goals, and WRITE THEM DOWN! This will really help you focus.
-Separate your practice time from playing. When you're learning a new skill, it takes time for it to sink in. You could try to master some chord changes by practicing 6 hours straight, and still not get it. You could practice 15 minutes a day, and find that within a week, you have it down pat. Don't burn yourself out with practice. Use a metronome; but before you even pick up the guitar know exactly what it is you're going to work on, and how that skill fits in to your big plan for your long range goals. Keep your practice sessions short, and fun. When you feel yourself getting frustrated or bored, maybe starting to drift away from what it was you were going to work on, put the guitar down for a bit. Its often better to have a bunch of short practice stints through the day than one long one.
-Give yourself time to play... time to experiment with the new skills you've practiced, BUT don't let that become a time to start reverting to bad habits that you're trying to cure. Again, play within your ability.
There's lots of good acoustic lessons on this site. Lisa McCormick's lessons are great, and she starts off at a very basic level. Even though I am a pretty proficient guitar player, I'm still working through all her beginner lessons for the very reason you site, to ensure I'm not incorporating bad habits that will hold me back and limit my growth.
Definitely go back to the basics and fix what you feel or know is wrong with your guitar playing. I've had to do that myself, so head's up... it can feel very awkward or darn near impossible to break some bad habits and adopt a new technique. However, the good news is that you really do "break" the habit... at some point, and it won't take long, things will just click and you'll get it... just don't let the initial awkwardness throw you.
Stay positive.. visualize your success and playing well, and sooner than you think you'll be there... and set those goals!! You can't arrive at your destination if you don't know where you're going.
Good Luck!