Can you say:
I wouldn't be doing this unless I'm desperate.
I wouldn't be doing this unless I was desperate.
Are both okay?
Only your second sentence is correct. Some people will use the subjunctive mood there "I wouldn't be doing this unless I were desperate". If you wanted to use "I'm desperate", you would need "I won't do it unless I'm desperate".
Remember - if you don't use correct capitalisation, punctuation and spacing, anything you write will be incorrect.