A lot of guitarists can play a solo note for note, not a lot can do an improve solo that sounds as good.
I'm a strong beleiver in improv. in everything. TheDirt suggestion of knowing the original solo to have something to fall back on is really great. Some nights you may be in the zone and could screw up a solo real fast.
The great thing about learning the entire solo is that it will teach you timing and different new techniques.
I would suggest learn the original solo for learning purpose but improvise on it in jam sessions. When you feel confortable with improv, try it on stage.