Yes, an unattuned magic weapon can be a pact weapon.
While not attuned to a magic weapon requiring attunement, you don't benefit from its magical properties... but that doesn't suspend its classification as a magic weapon.
Here are the relevant rules for Attunement from the Basic Rules:
Some magic items require a creature to form a bond with them before their magical properties can be used. This bond is called attunement, and certain items have a prerequisite for it.... Without becoming attuned to an item that requires attunement, a creature gains only its nonmagical benefits, unless its description states otherwise.
However, nothing in that rule indicates that the magic weapon stops being a magic weapon while you're not attuned to it, only that you can't benefit from its magical properties during that time. Being a "magic weapon" isn't really a property, per se. It's a categorical description of the intrinsic nature of the weapon.
Now refer to the rules of the Pact of the Blade feature:
You can transform one magic weapon into your pact weapon by performing a special ritual while you hold the weapon.
There's no stipulation other than that the magic weapon you turn into your pact weapon must be... a magic weapon. It still is, even when you're not attuned to it.
Note that the unattuned magic weapon as a pact weapon still benefits from being treated as magic according to the Pact Boon feature simply because it is a pact weapon (any pact weapon is treated as such whether it is a magic weapon or not), much less because it is still a magic weapon:
This [pact weapon] counts as magical for the purpose of overcoming resistance and immunity to nonmagical attacks and damage.