What I did is play lead to midi files. Any kind of style.
Just go on the internet and make a search on midi files.
Then I tries to play in the right key. I just hit a few notes here and there. Then I went a little further. I took some licks I learn and tried to place them in the song.
What this do is help your timing and basic aptitude to know the key of a song.
Then I just joined a few licks together. Trying to fit 2-3 licks you know well into a lot of different songs.
I'm not the best soloist but I can fit a couple of licks into a song.
Try it and see if it will help you.