Literally, you are asking whether you can ask this.
However in spoken English, it is quite common to say "May I ask..." and then ask a question. In that case the second part (the question) is in normal question form ("how do you do this?"). But how do you write this correctly, in written English? The only way I know is correct is this:
3. May I ask...how do you do this?
If there are other correct written forms (for this exact series of words), I don't know them. But maybe someone else can help.