In Longman Dictionary I have found the word 'mother-in-law'. Can I write the word 'mother-in-law' as 'mother in law' or 'mother in-law'?
Not all compound nouns require hyphenation, however, "mother-in-law" does require hyphenation to avoid ambiguity.
Without hyphenation, it could mean that your mother works in the field of law:
I have a brother in banking and a mother in law.
Your other suggestion of partial hyphenation doesn't really make any sense. Compound nouns should either be hyphenated or not.
Can I write the word 'mother-in-law' as 'mother in law' or 'mother in-law'?
Do so at your own risk and peril, in speech we do not hear punctuation marks, but if you were writing in an English exam or an academic paper, omitting the hyphens would be be considered a serious mistake.
Compound words that necessitate the use of hyphens are normally in the attributive position, they are similar to adjectives inasmuch they do not have the plural suffix -s. For example, their three-year-old child, well-known celebrities, a five-page report, five-a-side football, a man-eating shark (sharks that eat humans). If we omitted the hyphen in the last example, it would literally be interpreted as a man eating [a] shark. Hyphens help to disambiguate!
I doubt that you can because other dictionaries, for example: the Cambridge Dictionary, also spells the word like this: mother-in-law.