Yes, as long as you are covered by a qualified HDHP and are not enrolled in Medicare. You can be eligible for Medicare and still contribute to an HSA as long as you are covered by an HDHP and not enrolled in Medicare.