Yes you can. I did it with my old commuter MTB with bar ends.
Start wrapping at the top of the bar end, where the plug is (take the plug out, obvi) with a little bit hanging over the end of the bar. Wrap down the bar and cut if off just as you get to the end and tape it with electrical tape. Pop the plug back in the top to hold in/down the tape at that end.
Done.
I might have a pic of it, but I'm at work right now.