Yes, you can on most bookings. However, some heavily discounted tickets are not eligible for mileage accrual.