This is really not a good idea, but seeing as you are committed I will offer the best advice I can.
I'm currently in southern Spain and it's been as high as a (genuine) 36ºC. Marrakech is currently forecast at 42ºC. With the strength of the summer sun
anything over 32ºC is too hot to ride, so if this is the case plan to start really early each morning, getting up BEFORE first light and leaving at dawn. Then find somewhere by 2pm with good shade, beer and a pool for the overnight. If it's really hot, soak your jacket and trousers in water then start riding, this will cool you down considerably. Take extra water with you so you can repeat the soaking every hour or so. This is the nearest to biking aircon you can get.
And forget camping, it's far too hot and you waste too much time putting up/taking down the tent and gear. In Spain look for roadside hostals which are about €40 for a twin bedded room and €10 each for menu of the day.
Last June two Portuguese guys on Varaderos died of probably heatstroke near Merzouga, so drink a minimum of 3 litres of water each day, chugalug half a litre before even starting out, and keep out of the sun at every opportunity.
Stay at altitude in the mountains where possible to keep the temperature down. Alternatively head for the coast which will be cooler. My trip report from last summer might be of interest, especially post #11 onwards, see
http://www.morocco-knowledgebase.net/forum/showthread.php?t=304