Yes; it is possible to sort in O(nd) time. One solution is a simple modification of insertion sort. We process the input array from start to finish; for each element, we look at the last d elements of the output array, and insert the new element in its appropriate position.
There may, of course, be faster algorithms; this particular choice of algorithm was to make it easier to demonstrate asymptotic bound.