You can as long as you are not reported to the police by somebody or they don't find out.
Because if caught , for sure you go to jail and then you will be deported...
The other solution is to get married...
But there are plenty of other things you should be aware of before joining Dubai or this will be bad surprise.
There is somewhere on the UAE government website a guide to the foreigners planning to come here , it is really a mandatory reading according to me if you plan to come and work here.