You can get a temporary license by going to the traffic department with your visa, your passport, a photo and your original license. You'll have to undergo an eye test, pay QR180 (or QR250 - can't remember!) using a credit card (no cash accepted) and you walk out of there with your temporary license.
After you get your RP, you go back with your temporary license and your new ID card and get your permanent license immediately (after paying the fee, of course).