Male guinea pigs (boars) can and should be neutered to decrease unwanted guinea pig pregnancies. You should seek a veterinarian who is familiar and comfortable with the special scrotal anatomy of the guinea pig boar and has already performed several successful guinea pig neuters.
Neutering can be performed at any age. It's a good idea, however, to wait until the guinea pig has reached his mature weight. This way his organs will be developed enough to process the anesthesia well.
The guinea pig will feel some discomfort at the surgery site for about a day or so, but these pets, like most other animals, usually don't let a little pain stop them from taking part in all of their normal daily activities. Talk to your veterinarian about providing post-surgical pain relief so that your guinea pig is as comfortable as possible.