No, you cannot use your maternity leave to shorten your notice period.
However, you can use your maternity leave during the notice period, and the time you are on maternity leave will count towards serving your notice period.
Your remaining maternity leave will be forfeited once you leave your job.