Hello Filip00, the answer to your question is yes. You can do that with a relay. Ignition on powers relay sends power to mirrors to open , and ignition off relay relaxes and power is sent to the mirrors to closed position. If you can get me the wiring diagram i can lay it out for you. Just remember that the switch on door will no longer work. You can only have one or the other. Also the door switch controls this function which makes it easy, cause it does not go through the BCM. I will require a bit of disassembly and at the end not worth the trouble unless you know someone that can do it correctly. I did convert my existing mirrors on my 2009 to folding mirrors and it works just like yours.
Let me know if there is anything else I can help you with. my e-mail is :
javbat@hotmail.com
Best Regards
Javier