Portfolio optimization has long been a central theme in finance. With ongoing advancements in machine learning, there is a significant opportunity to integrate predictive methods into portfolio optimization. This paper proposes leveraging Long Short-Term Memory (LSTM) networks alongside the established Mean-Variance (MV) optimization framework to construct optimal portfolios. These portfolios aim to help financial investors effectively manage and mitigate risk while maximizing returns. The study meticulously screened the leading stocks of 12 prominent UK companies listed on the London Stock Exchange (LSE), known for their influence and visibility. Initially, the study applies the LSTM networks to predict stock price volatility and integrates these predictions into the MV model to allocate portfolio weights effectively. To underscore the superiority of the proposed approach, the study compares cumulative returns from portfolios optimized for maximum and minimum variance Sharpe ratios with real data against the FTSE100 index over the same period. The results demonstrate that the portfolio optimized with the maximum Sharpe ratio significantly outperforms both the conservative minimum variance portfolio and the FTSE100 index. This empirical evidence underscores the practical value of integrating advanced machine learning techniques with established financial theory, enabling more innovative and efficient investment strategies to meet the evolving needs of financial investors.