To me, both are equally important. They both go hand in hand to make a song work. Downloading backing tracks from the internet and improvising/shredding over them are great to show off skills, technique, fretboard knowledge, etc., but after a while it can become bland. Being able to compose a song that is catchy and has a great melody is the key to the strong foundation of the song. The shredding/soloing is only there to enhance the overall picture. Some of the most memorable solos of all time aren't necessarily shredding to no end, but instead slower with more soul to it. Now, when you can combine the soulfulness and speed where needed, and can actually make it fit and compliment the song, then you are golden.
Something even some of my favorite artist can't always pull off is making the solo fit and compliment the song. Tons of badass songs out there, then you here the solo and its like wow that doesn't fit the mood/feel of the song at all. It isn't always about speed when it comes to memorable solos. I feel its more about note choice and the way you choose to express the notes that count. YMMV etc etc yadda yadda