Suspect in Colorado shooting bought gun legally: officials