Technically, it should be possible, but it would not be easy. It would require additional electrical design and electronics, as well as programming.
POTS lines are analog. The Raspberry Pi's GPIO pins are all digital. You would need to use an analog to digital converter, or create one yourself. Here is some info.
The second problem is POTS electrical power. On a standard Raspberry Pi, all the GPIO pins are 3.3 volts. I believe it is stated that even inputting 5 volts can cause potential damage to the Pi. POTS lines can be as low at 6 volts and spike up to 90 volts. You would need electronics to reduce the power to 3.3 volts coming in and increase it going out. Otherwise, you would fry your Pi. Here is some info on POTS power.
Assuming you could manage to do all of the above, you would need to convert digital data into analog tones that a phone actually uses. You would need to recreate DTMF tones for dialing. You would also need to convert digital audio out to analog and vice versa.
Then there is the programming to manage any of the mentioned processes if they arent handled by the electronics.
Again, its possible, but probably not worth the hassle. A dedicated device seems like a much better solution.