This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.
var styleIcon = new ol.style.Style({
text: new ol.style.Text({
text: '\ue059',
font : 'normal 18px "Glyphicons Halflings"',
stroke: new ol.style.Stroke({ color: 'black', width: 2 })
fill: new ol.style.Fill({color: 'yellow'})
textBaseline: 'Bottom',
scale: 1
})