Hi Angus,
I think I've managed to narrow down that list to just three D. Allans. All the rest either are the wrong age, have different Christian names (or have middle names - your David didn't, I take it?) or have different parents/spouses listed on their CWGC record. The likely ones are:
David Allan, Private of the Scots Guards (5088), d. 18/12/1914
David Allan, Private of the King's Own Scottish Borderers (12395), d. 11/04/1918
David Allan, Private of the Highland Light Infantry (240621), d. 13/04/1918
You may want to try the Roll of Honour on this website for WW1. I believe sometimes the place of birth is listed, so it should help to narrow down just that bit more which regiment your David served in.
http://www.military-genealogy.com/A post on the Military boards here would help too. There's a lot of knowledgeable chaps over there who'll probably find the information in a second!
hume
PS.
The first reference is SC70/8/141/9 regiment number 2869 and the second reference I have is SC70/8/696/16 regiment number 650278.
The first is David B. Allan, son of William and Janet Forbes Allan of Sandyford Street, Kelvinhaugh. He was only 19 in 1915 (when he died), so would be born c. 1896. The second was the son of John and Janet Russell Allan, and husband of Jean O. Allan of Marchmont Crescent, Edinburgh. He was 29 in 1917 so while he matches the age of your David, the family details seem to rule him out.