Conceptually, but the devil is in the details.
The SpeedyStepper would have to be aware of the MCP object to be able to use it. For this, you could store a reference to the MCP object by adding to SpeedyStepper/src/SpeedyStepper.h at master · Stan-Reifel/SpeedyStepper · GitHub in the "private" section (starting at line 95) something like this:
Adafruit_MCP23X17 * mcp;
But you also need to #include the MCP library, so at about line 39 of the .h file linked to above add
#include <Adafruit_MCP23X17.h>
I'd pass a reference to the MCP object to the constructor of the SpeedyStepper class. So do something like this, in here SpeedyStepper/src/SpeedyStepper.cpp at master · Stan-Reifel/SpeedyStepper · GitHub line 202:
SpeedyStepper::SpeedyStepper(Adafruit_MCP23X17 *_mcp);
You will also have to modify the SpeedyStepper .h file so that the declaration of the constructor matches the modification of the .cpp file!
In the constructor, copy the reference to a local version for the SpeedyStepper object. This means you need to add a line of code where you copy the passed reference to the locally held copy:
mcp = _mcp;
As to the 'connectToPins' function, all it needs to change is not write to a GPIO directly, but use the MCP. So e.g. line 237 in the .cpp file would change to something like this:
mcp->pinMode(stepPin, OUTPUT);
(note that we use "mcp->" instead of "mcp." because we're using a reference to the mcp object).
You'll have to modify the other pinMode and digitalWrite lines in a similar fashion.
This is really all that should be necessary to modify the library.
In your main sketch, you will need to first initialize the Adafruit MCP object, and then create the SpeedyStepper object. The order is important, because the MCP needs to exist before you pass its reference to the SpeedyStepper!
So somewhere at the top of your sketch you will add something like this:
Adafruit_MCP23X17 mcp;
SpeedyStepper(&mcp);
Note that we pass the mcp object to SpeedyStepper as a reference, using "&mcp" instead of "mcp".
From that point onwards, you should be able to use the SpeedyStepper object as you'd use it normally, with the only distinction that the pins you pass to connectToPins() are the GPIOs on the MCP.
To prevent confusion between the original SpeedyStepper and the mcp-enabled version, I'd rename the whole thing to something like SpeedyStepperMCP or so. I did not include this in the example snippets above; you'll have to consistently change the name throughout the .h and .cpp files.
Disclaimer: I did this as a theoretical exercise and have not actually tested if it compiles, let alone if it works. I may have overlooked something; you'll have to do some troubleshooting as you make the changes I propose above.