Can you buy a museumkaart before arriving in the Netherlands?
Buy it at any of the museums covered by the card. Go to a less popular museum to purchase it and avoid crowds. When are you going? I was at the Rijks last week and tnere were no lines to buy tickets or to enter with a pre purchased ticket.
No, only dutch residents can buy online. The card is activated when purchased and expires in 31 days. Buy the museumkaart in Amsterdam on the day you wish to begin using it. It is sold at many places so you should easily be able to find them near where you are staying. Don't forget that when you write the date of purchase on it that you write it as day/month/year. Here's a link about it. museumkaart
Don't hesitate to use the Museumkaart to try out smaller museums, if only for half an hour. One of the major advantages is actually that it invites you to go to places you otherwise would have skipped. The Cromhouthuis and the Museum Willet-Holthuysen, for example, have excellently preserved interiors and allow you an impression of the life in those grandiose canal houses. The Hermitage has the wonderful semi-permanent exhibition »Look at us!« with that typically Dutch genre of group portraits. Here you find all the museums in Amsterdam (and other places in the province of Noord-Holland) to which your Museumkaart gives you access.
The is a cluster of interesting museums very close by to one another: Cromhouthuis, Grachtenhuis and Huis Marseille. The second one started accepting Museumaarten this July, making it a nice stop for 40-50min. One of the great things about the Museumkaart is that it allows the person to visit lesser-known places and quickly leave if they are not interested without loss of money, making it a low-risk proposition to explore alternatives. Other lesser-known museums that might be interesting (they are, to me) include Het Schip, Jan van der Togt (it's technically in Amstelveen but with access by tram), FOAM and the ones I mentioned above.