That's completely dependent on how much ambient light there is in the room. If it's pitch black, flash will eliminate motion blur. If there's enough ambient light to illuminate the subject with the aperture selected, and the subject is moving, 1/40 s will give you some blur. You might be able to get away with 1/30 s if the subject is posing/holding still. If it's a toddler running around the room, you'll need 1/125 or faster. You can also use a slow shutter and the C.Fn setting for second-curtain sync and then the motion blur will be in the proper direction (behind the subject) as a creative effect.