You can use them but they won't fit the battery holders, longer than the M5 batteries, if I remember correctly.
Gary, you are correct. The stock M5 battery brackets are too short for the M10/M15 batteries. However, if you want to run the M5 on the larger batteries on a regular basis, the M15 battery cage will bolt directly into the spot where the M5 battery cage sits! The M15 battery cage will still hold the M5 battery without issue.
Hey Joey, I know the solution is a little bit ugly, but I took a pair of side cutters to the top tab of the M5 battery cage, as we standardised on M10 sized batteries across our M5 M10 and M15. There was enough friction from the little foam pad to hold the M10/M15 batteries in the M5 in place even when inverted. That was the cheapest solution at the time