Extension cords, even those rated "heavy duty" are only for temporary use. Since it is a treadmill and is only "in use" for certain periods of time, I would not see a problem with it. I would, however, unplug it after use, and try not to run it for hours at a time.
Check the cord after you use it. If it is warm/hot to the touch, then it's probably not a good idea to continue with the extension cord.