Swimmer Penny Oleksiak, Canada's most decorated female Olympian, has accepted a two-year ban from competition stemming from three whereabouts failures.