I know, from having worked in Algeria, that if you cross into Algeria from Tunisia anywhere south of the Atlas mountains (in other words, anywhere south of about parallel with Ouargla) you will be in the unpopulated area of the country - the Big Eastern Desert - and thus south of the populated area where you would have serious security concerns due to civil unrest.
I think you could travel by road from Tozeur (a delightful city) through Ouargla and then south through Hassi Messaoud. I have never ridden or driven that route, but I have flown over that area a lot, and observed a reasonable amount of habitation along the way - as well as quite a few commecial farms (irrigated) on either side of the border. I have no idea whether there is an approved border crossing post there or not.
The security in the desert is very tightly controlled, due to the desire of the government to protect the massive oil exploration and production facilities that exist all around Ouargla and Hassi Messaoud. You will need to have a 'desert pass' (Lassiez passiez?) to enter that area, that is a separate and different document than a visa. Take lots of passport size photos with you.
Hassi Messaoud is a large industrial town, population about 30,000, that exists to serve the oil industry. When you drive into that town, you'll think you are in either West Texas or Fort McMurray, Canada. You can buy anything you would need or want there (groceries, food, fuel, tools, etc.) although parts specific to a motorcycle might be difficult to find. Other than that, Hassi's a cultural rat-hole, nothing there to stay for.
If you have any work connection whatsoever with the oil industry or oilwell service industry in Europe or North America, you'll probably find a branch of your company in that town. There is a rotating population of about 3,000 to 5,000 expatriates at any given time. When I stayed there it was not uncommon to see dual-sport bikes from out of the country passing through once or twice a week.