Switching back and forth between octane ratings will not do any harm to your engine. Since your engine is designed to run on 87 octane fuel it seems strange that you would have a pinging problem. Have you seen your dealer for an analysis? If there is nothing wrong with your engine then it seems that the 87 octane fuel that you are purchasing may not be all that it is supposed to be. Have you tried different brands?
The pinging that you hear is bad for your engine. When you drive at low rpm's with wide throttle openings, you create high pressures in the cylinders because the engine has lots of time to take a very full fuel/air mixture into the cylinder. This is then compressed by the upward stroke of the piston and ignited by the spark. However, the increasing pressure in the cylinder during the compression stroke also creates heat before the spark ignites the fuel air mixture ( diesel principle ). If the temperature of the fuel air mixture reaches its ignition point before the spark occurs to ignite it, a spontaneous explosion will occur in the cylinder. This explosion is far more violent than the uniform burning of the fuel/air mixture that occurs when ignited by the spark plug and this explosion creates the telltale "pinging" noise that is heard. There are other contributing factors such as a lean fuel/air mixture, carbon build-up or hot spots in the cylinder, etc. Regardless of how it occurs, it is not good for your engine and a few extra bucks on a fill-up of higher octane fuel is cheap insurance against the damage that it can cause. Good Luck with your cure, GlennMc.