I think it can be done. If not with the original keyless entry system, the aftermarket system should do. The remote is sending a signal to the receiver which is activating the motors to lock the doors and also providing the power to the turn signals. The same power can be applied to the motor in the retractable mirrors. A motor run in opposite directions by reversing polarity. In one direction, it is opening the mirror, in the other, it is closing it. We can provide power for with one polarity with the unlock button's signal and the second polarity with the lock button's signal as both work differently.
However, I am not sure about how the button installed in the car for these mirrors would work as it is not a "come back" switch. One it is pressed, it is suppose to close the mirrors until we press it again and it comes back. A little modification would be required there as well.