Alsheimer to buy Amherst office building for $3 million