A Scottish MP has been praised after becoming the first woman to reveal in parliament that she is on her period.