Yes, you can do it, and while your supply may take a small hit, you won't lose it and you can build it back when you come home. If If If you do it right.
You will need to be very diligent about pumping. You need to pump every time the baby would nurse if you were home. So if baby nurses every 4 hours around the clock, you need to stop what you are doing and find a way to pump every 4 hours. (I admit, I did skip a middle of the night pump when I did this and pumped an extra time during the day to make up for it, but I was only gone 3 days, not 5 and even so, my supply took a small hit.)
If you just pump whenever you have time, and not on your baby's nursing schedule, then your supply will really suffer, and you could lose it.