Both are technically fine, but "I was dining" sounds a bit awkward. "Dining" is a slightly more formal word to use. Example: "We spent the evening dining on lobster and clams." It usaully needs to be followed with detail.
I often do not hear the article "a" used before dinner. It would be more common to say "I was having dinner." This is usually followed with more detail, such as, "I was having dinner with friends when you called."