Yes you can actually take the DHA (Dubai) & QCHP (Qatar) exams before completing your 2 years experience period. (Note: Other exams such as MOH HAAD doesn't permit you to do so.)
However the dataflow will produce your eligibility letter only after acquiring that 2 years complete experience.
Moreover clinics and hospitals are hiring only fresh licenced dentists with more that 2-3 years experience only.
So its best to wait until you complete your 2 years experience before you fly to work in the Gulf