You can use binary search.
For a searched value x, consider the array b[i] = a[i] - x. Now find the maximum sum subarray of length at least k.
This works because the average of a subarray of length k is (a[p] + ... + a[p + k - 1]) / k. So we have:
(a[p] + ... + a[p + k - 1]) / k >= avg
a[p] + ... + a[p + k - 1] >= avg * k
(a[p] - avg) + ... + (a[p + k - 1] - avg) >= 0
So, if you binary search for the average, by substracting it from each element, if you can find a positive-sum subarray (find the maximum one and check if it's positive) of length at least k, then avg is a valid answer: continue to search in [avg, max_avg] to see if you can find a better one. If not, reduce search to [0, avg].