Economic optima in resource allocation for smallholder subsistence farming in Ghana