Enhancing crop water productivity is crucial for regional water resource management and agricultural sustainability, particularly in arid regions. However, evaluating the spatial heterogeneity and temporal dynamics of crop water productivity in face of data limitations poses a challenge. In this study, we propose a framework that integrates remote sensing data, time series generative adversarial network (TimeGAN), dynamic Bayesian network (DBN), and optimization model to assess crop water productivity and optimize crop planting structure under limited water resources allocation in the Qira oasis. The results demonstrate that the combination of TimeGAN and DBN better improves the accuracy of the model for the dynamic prediction, particularly for short-term predictions with 4 years as the optimal timescale (R2 > 0.8). Based on the spatial distribution of crop suitability analysis, wheat and corn are most suitable for cultivation in the central and eastern parts of Qira oasis while cotton is unsuitable for planting in the western region. The walnuts and Chinese dates are mainly unsuitable in the southeastern part of the oasis. Maximizing crop water productivity while ensuring food security has led to increased acreage for cotton, Chinese dates and walnuts. Under the combined action of the five optimization objectives, the average increase of crop water productivity is 14.97%, and the average increase of ecological benefit is 3.61%, which is much higher than the growth rate of irrigation water consumption of cultivated land. It will produce a planting structure that relatively reduced irrigation water requirement of cultivated land and improved crop water productivity. This proposed framework can serve as an effective reference tool for decision-makers when determining future cropping plans.