Covalency of metal oxides in high oxidation states
Metal oxides are not always basic.  In many cases where the bonding is strongly ionic, the oxide ions do act as a base.  However, if the metal is in a high oxidation state an ionic bond would require a prohibitively high charge on the metal ion; the ionization energy required to put seven positive charges on one manganese atom far exceeds what can be reclaimed from the electron affinity of oxygen and electrostatic attraction alone.  The energetically preferred option for $\ce{Mn2O7}$ is to form polar covalent bonds instead.  Such bonds are similar to those in $\ce{CO2, SO3, P4O10,}$, etc., and thus $\ce{Mn2O7}$ will act similarly to those oxides -- as an acid anhydride.