Tesla Motors has signed a deal with Toyota Motor Corp to start developing an electric version of the RAV4.