When the answer to لَوْ is negative, the affirmative answer-lam لَـ is not placed before it.
لَوْ صَدَقْتَ مَا ضُرِبْتَ
If you had told the truth, you would not have been beaten.
The negative answer begins with مَا: مَا ضُرِبْتَ. In this construction, do not write لَمَا ضُرِبْتَ.
Compare: لَوْ دَرَسْتَ مَا رَسَبْتَ — If you had studied, you would not have failed.