You certainly can in speech. I think if I were writing it in a more formal setting, I'd say "I was there for three days" or "I went there for a three-day visit/stay."
thanks for the reply as i had thought it was supposed to be "i was there for 3 days" as i went for for three days is not really appropriate for writing thanks again