The corner of the mouth is prime location for bacterial or fungal infections, since it tends to stay warm and moist. Antibacterial creams (like neosporin) or antifungal creams (like tinactin) may help clear the area.
In addition, since shaving seems to initiate the outbreaks, you may have bacteria or fungus on the razor, or you might be having an allergic reaction to the razor (contact dermatitis). A dermatologist ought to be able to help you.
If you say that these can't be popped like a normal pimple, that suggests that you're trying to pop them to see if they can be popped. This always makes them last longer. I suggest that you set an appointment with a dermatologist, and while you are waiting for it, do nothing but apply bacitracin or neosporin to the pimples. The body will reabsorb these, but it takes several weeks of leaving them be.
Take care.
Dr. Rockoff