Yes, there was an attempt to bribe the Ottomans but it was an attempt to keep them out of the war, rather than to change sides.
During WWI, the British offered, or considered offering, a number of bribes or inducements not only to the Ottomans / Turkey but also to Greece. The offer of (British) £4,000,000 to the Ottomans was not for them to join the Allies; it was to 'buy' Ottoman neutrality. It was actually Greece that Britain tried to bring to the Allied side, not Turkey. The main primary source for the above appears to be the diary of a senior British civil servant.
The £Turkish 5 million the Germans "handed over" was in fact a loan, the source for this apparently being a Berlin foreign office file. This initial sum turned out to be a fraction of the total amount the Germans eventually loaned the Ottomans (over £Turkish 180 million).
Note on currency values: according to Historicalstatistics.org (if I'm reading it right), 1 British pound in 1913 could buy approx 7.331 gram gold whereas 1 Ottoman lira could buy approx. 6.659 gram gold.
- Britain and the Ottoman Empire, 1915
The bribery attempt referred to by Hew Strachan (2005) took place just after the Battle of Sarikamish (22nd Dec 1914 to 17th Jan 1915). The Gallipoli campaign, which began on 17th Feb 1915, ended any hopes of it succeeding when the landings began.
In January 1915, the Ottoman Army under Enver suffered a crushing
defeat in the Caucasus against the Russians at the Battle of
Sarikamish, from which it never fully recovered. Just after
Sarikamish, the British made their first attempt to bribe the Turks
into peace. Hankey suggested the idea to Captain (later Admiral)
Reginald Hall, the Director of Naval Intelligence. The sources do not
disclose under whose authority Hankey was acting, but Hall instructed
Mansfield Cumming, the first Chief of the Secret Intelligence Service,
to make the necessary arrangements. On his own authority, Hall
proposed that up to £4,000,000 should be offered to the Turks. His
chosen emissaries, Edwin Whittall and George Eady, had excellent
contacts in Constantinople. Whittall told Cumming that the project was
a ‘forlorn hope’ unless the Entente guaranteed that Constantinople
would remain in Ottoman hands. He was right. In April 1915, Whittall
and Eady negotiated with Turkish representatives, but the Gallipoli
landings that month destroyed whatever prospect there might have been
of achieving this ambitious goal.
Source: Joseph Maiolo & Tony Insall, 'Sir Basil Zaharoff and Sir Vincent Caillard as Instruments of British Policy towards Greece and the Ottoman Empire during the Asquith and Lloyd George Administrations, 1915–8'. In 'The International History Review, Volume 34, 2012 - Issue 4'
Maiolo & Insall's source for this is K. Jeffery, MI6: The History of the Secret Intelligence Service 1909–1949 (London, 2010). The sources given by Jeffrey are the Hankey diary (4 Mar 1915) and The Eyes of the Navy; a Biographical Study of Admiral Sir Reginald Hall, K. C. M. G. , C. B. , LL. D. , D.C.L by W. M. James. Curiously, although this attempted 'bribe' is mentioned in Strachan (2005), he does not mention it in his (more detailed) 2012 book (see link provided in sempaiscuba's comment).
Perhaps also worth noting is that in the same month (March) that the British were talking to the Ottomans, the Germans loaned a further £Turkish 4,346,093.
In late 1915, the British, having earlier turned their attention to bringing neutral Greece in on the side of the allies, sent £1,487,000 to the account of Basil Zaharoff (an arms dealer with a reputation that might politely be described as 'colourful') in order to 'facilitate' this change in their stance, but King Constantine I was pro-German and his opposition could not be overcome, even with other inducements.
- Britain and the Ottoman Empire, 1916
The authors also refer to another £4,000,000 bribe which was 'considered' in May 1916. It's complicated, but - in short - several meetings took place through various intermediaries (Basil Zaharoff being a key figure again), this time at the instigation of the Ottomans
to discuss the possible defection of Enver and several dozen of his
colleagues in the ruling Committee of Union and Progress (the Young
Turks)...in March 1916
After various other meetings, Zaharoff met the Prime Minister, H. H. Asquith:
It is difficult to reconstruct what was said, but the evidence
suggests that Asquith expressed interest in the idea. As he later told
Hankey (who, in his diary noted that a bribe of £4,000,000 was
considered), the scheme ‘seemed far-fetched and unlikely to come off,
but as there was to be no pay until the goods were delivered, there
seemed no objection to letting Zaharoff try’
However, this too fell through as the Turks lost interest, apparently because their military fortunes took a turn for the better. The primary sources for the above are the aforementioned Hankey diary and the papers at the Foreign Office of Sir Vincent Caillard, the financial director of the arms manufacturer Vickers. How much chance it had of succeeding in the first place is debatable given that the Germans had loaned a further £Turkish 32 million in treasury bonds in February.
- Britain and the Ottoman Empire, 1917 & 1918
Further consideration was given to bribing Turkey out of the war in 1917 and 1918 (as mentioned in the link provided by sempaiscuba in his comment). These are detailed in Maiolo & Insall, who cite Hankey, Caillard and Lloyd George's papers as primary sources.
- German loan to the Ottoman Empire, 1914
This loan was for £Turkish 5 million (the currency distinction between the British £ and the Turkish £ is not made clear in Strachan's 2005 book) - the latter was worth slightly less than the former in 1913 (data for 1914 is hard to come by). The terms of repayment were initially strict but were lessened considerably as an inducement for the Ottomans to enter the war. An initial deposit of £Turkish 2 million was made, with the balance due when Turkey entered the war. The source for this is Strachan's 2012 book; he cites Ulrich Trumpener's Germany and the Ottoman Empire, 1914-1918 which in turn cites the Berlin foreign office file Turkei 110 as the primary source.
In addition, the Germans had (in August) provided the Turkish navy with two ships (the cruiser Breslau and the battlecruiser Goeben) for a token sum. These were particularly welcome as the British had earlier (in July) cancelled the delivery of two dreadnoughts (they were requisitioned by the Royal Navy), a move which caused much anger in Turkey.