Man accused of robbing pharmacies at gunpoint