Is it a good idea for an international student to use his master's thesis preprint as his writing sample? I am applying to doctoral programs in the US.

I would like to use my master's thesis preprint as my writing sample because it was written in English and is in the field on which I intend to concentrate in my possible doctoral studies. 

Though my advisor, who is not a native speaker too, feels it is okay for my thesis to be my writing sample, I am afraid, because I did not make the English in my thesis polished by native speakers, that using it as my writing sample would backfire.
Yes.  If an applicant to a doctoral program has written a master's thesis, it will be assumed that the thesis is the applicant's best work.  Therefore admissions committees will expect to receive the thesis as the writing sample.  If your thesis is long, you may wish to send a polished excerpt; the expected length may be field dependent.