That depends on how your extensions are wired up. If your master socket has a filtered faceplate and the extensions are wired as telephone only, then the answer is yes. This is the normal situation for an engineer install. But it's possible to wire up an unfiltered extension from the back of the faceplate, and a modem can be connected to this.
If your master socket doesn't have a filtered faceplate, then a modem can be connected to any extension, but the performance will be (very) sub-optimal, and your wiring needs to be sorted out.