Of course you can, at least you can try. Hostels are small businesses that don't work by strict rules. And why should they not take your reservation on the same day?
There is always the chance that they are full, but then you stay somewhere else and come back the next day if you really want to stay at that place.
I think in 20 months in Latin America, I called ahead twice, in both cases these were popular hostels in remote locations with nothing else nearby (both not in Peru). In all other cases I just walked in (and sometimes out again after seeing the place).
If you have a phone, it can't hurt to check their availability before taking a bus or taxi half-way through a city.